package chapter24;


/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2019/2/27 19:24
 */
public class CLInitDemo {
    public static void main(String[] args) {
        ClassLoader cl = ClassLoader.getSystemClassLoader();
        String className = CLInitDemo.class.getName() + "$Hello";
        try {
//            Class<?> cls = cl.loadClass(className);
            Class<?> cls = Class.forName(className);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }

    public static class Hello {
        static {
            System.out.println("hello");
        }
    }
}
